/*
	Run all scripts
*/

clear all
set more off
set seed 6129

* Install required packages if not already installed
local user_commands ietoolkit estout wyoung
foreach command of local user_commands {
    cap which `command'
    if _rc == 111 {
        ssc install `command'
    }
}

* !TODO! Change the root directory to your replication files path
global root "path/to/replication-files"

* Set global paths
global data "$root/data"
global outputs "$root/outputs"
global scripts "$root/scripts"

* Create subdirectories if they don't exist
capture mkdir "$data/2_processed"
capture mkdir "$outputs"

* Run scripts
do "$scripts/1_data-prep/prepare-baseline.do"
do "$scripts/1_data-prep/prepare-followup1.do"
do "$scripts/1_data-prep/prepare-followup2.do"
do "$scripts/1_data-prep/append-rounds.do"
do "$scripts/1_data-prep/variables-creation.do"
do "$scripts/2_analysis/analysis.do"
